package com.tt.fashionWebSite.dao.jpa;

import com.tt.fashionWebSite.dao.UserDao;
import com.tt.fashionWebSite.domain.User;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by 10520_000 on 10/25/14.
 */
@Repository("userDao")
public class UserJpaDao extends GenericJpaDao<User, Long> implements UserDao {

    public UserJpaDao() {
        super(User.class);
    }

    @Override
    public List<User> getUser() {
        List<User> temp = getEntityManager().createNamedQuery(User.SEARCH_ALL_USER_QUERY, User.class).getResultList();
        return temp;
    }
}
